"""
自定义异常模块

定义项目中使用的自定义异常类
"""


class Gamer520Exception(Exception):
    """基础异常类"""
    
    def __init__(self, message: str, error_code: str = None):
        super().__init__(message)
        self.message = message
        self.error_code = error_code


class BrowserException(Gamer520Exception):
    """浏览器相关异常"""
    pass


class NetworkException(Gamer520Exception):
    """网络相关异常"""
    pass


class AIServiceException(Gamer520Exception):
    """AI服务相关异常"""
    pass


class PageElementException(Gamer520Exception):
    """页面元素相关异常"""
    pass


class NavigationException(Gamer520Exception):
    """页面导航相关异常"""
    pass


class PopupException(Gamer520Exception):
    """弹窗处理相关异常"""
    pass


class ConfigurationException(Gamer520Exception):
    """配置相关异常"""
    pass


class ValidationException(Gamer520Exception):
    """验证相关异常"""
    pass


class AuthException(Gamer520Exception):
    """认证相关异常"""
    pass